home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 4: GNU Archives / Linux Cubed Series 4 - GNU Archives.iso / gnu / gawk-3.000 / gawk-3 / gawk-3.0.0 / test / arrayparm.awk < prev    next >
Encoding:
AWK Script  |  1995-08-13  |  301 b   |  22 lines

  1. #
  2. # Test program from:
  3. #
  4. # Date: Tue, 21 Feb 95 16:09:29 EST
  5. # From: emory!blackhawk.com!aaron (Aaron Sosnick)
  6. BEGIN {
  7.     foo[1]=1;
  8.     foo[2]=2;
  9.     bug1(foo);
  10. }
  11. function bug1(i) {
  12.     for (i in foo) {
  13.     bug2(i);
  14.     delete foo[i];
  15.     print i,1,bot[1];
  16.     }
  17. }
  18. function bug2(arg) {
  19.     bot[arg]=arg;
  20. }
  21.